<?PHP
  class FileSystem{

    public static function deleteDir($path){
      $dir = opendir ($path);
      while(($entry = readdir($dir)) !== false) {
        if($entry == '.' || $entry == '..') continue;
        if(is_file ($path.'/'.$entry) || is_link ($path.'/'.$entry)) {
          unlink($path.'/'.$entry);
        }
        else if(is_dir($path."/".$entry)){
          self::deleteDir($path."/".$entry);
        }
      }
      closedir ($dir);
      rmdir ($path);
    }

    public static function deleteFile($path){
      return unlink($path);
    }

  }
?>